package com.ym.domain.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.ColumnComment;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableComment;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import java.time.LocalDateTime;

@Data
@Table
@TableComment("系统用户表")
public class SysUser {

    public static final String USER_ROLE_ADMIN = "admin";
    public static final String USER_ROLE_USER = "user";

    @TableId
    @Column
    @ColumnComment("用户id")
    @IsKey
    private Integer userId;

    @Column(length = 50)
    @ColumnComment("用户类型")
    private String userRole;

    @Column(length = 20)
    @ColumnComment("用户名称")
    private String userName;

    @Column(length = 100)
    @ColumnComment("用户密码")
    private String pwd;

    @Column(length = 50)
    @ColumnComment("备注")
    private String remark;

    @Column
    private LocalDateTime createTime;

}
